<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>后台管理</title>
	<base href="${base}/">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
	<#include "/management/index/common.html">  
	<script type="text/javascript">
	
			$(function(){
				initMenu();
			});
		
			function initMenu(){
				var $ma=$("#menuAccordion");
				$ma.accordion({animate:true,fit:true,border:false});
				$.post("management/index/getMenuModule", {username:"1"}, function(rsp) {
					if(rsp.children && rsp.children != ''){
						$.each(rsp.children,function(i,e){
							var menulist ="<div class=\"well well-small\">";
							if(e.children && e.children.length>0){
								$.each(e.children,function(ci,ce){
									var effort=ce.name+"||"+ce.className+"||"+ce.url;
									menulist+="<a href=\"javascript:void(0);\" class=\"easyui-linkbutton\" data-options=\"plain:true,iconCls:'"+ce.className+"'\" onclick=\"addTab('"+effort+"');\">"+ce.name+"</a><br/>";
								});
							}
							menulist+="</div>";
							$ma.accordion('add', {
					            title: e.name,
					            content: menulist,
								border:false,
					            iconCls: e.className,
					            selected: false
					        });
						});
					}else{
						$.messager.alert("提示", "暂无菜单数据,请初始化菜单!");
					}
	
				}).error(function() {
					$.messager.alert("提示", "获取菜单出错,请重新登陆!");
				});
			}
		
	</script>
		<style type="text/css">
	#menuAccordion a.l-btn span span.l-btn-text {
	    display: inline-block;
	    height: 14px;
	    line-height: 14px;
	    margin: 0px 0px 0px 10px;
	    padding: 0px 0px 0px 10px;
	    vertical-align: baseline;
	    width: 128px;
	}
	#menuAccordion 	a.l-btn span span.l-btn-icon-left {
	    background-position: left center;
	    padding: 0px 0px 0px 20px;
	}
	#menuAccordion .panel-body {
		padding:5px;
	}
	#menuAccordion span:focus{
		outline: none;
	}
	</style>
  </head>
  
  <body class="easyui-layout">
  	<#include "/management/index/layout.html">  
  	<div data-options="region:'north',border:false" style="height:40px;background:#EEE;padding:10px;overflow: hidden;">
  		<@north/>
  	</div>
	<div data-options="region:'west',split:true,title:'主要菜单'" style="width:200px;">
			<div id="menuAccordion"></div>
	</div> 
	<div data-options="region:'south',border:false" style="height:25px;background:#EEE;padding:5px;">
		<@south/>
	</div>
	<div data-options="region:'center',plain:true,title:'欢迎使用ERP'" style="overflow: hidden;">
		<@center/>
	</div>
  </body>
</html>
